<div style="margin: 15px 0px 0px 15px">
	<h3>Cập nhật thông tin loại thẻ</h3><hr />
	<div style="margin-top: 30px;  margin-left: 60px;">
	<div style="background: yellow;">
		<?php echo validation_errors();?>	
	</div>
		<?php $attrs = array('class'=>'frm_update_card', 'id'=>'frm_update_card')?>
		<?php echo form_open_multipart(base_url().'index.php/card/update/'. $card['id'], $attrs)?>
        <table class="form">
            <input type ="hidden" name ="id" value ="<?php echo $card['id'] ?>">
            <tr>
                <td class="label">Name:</td>
                <td><input type='text' name='name' value='<?php echo $card['name'] ?>'></td>
            </tr>

            <tr>
                <td class="label">Price:</td>
                <td>
                    <input name="price" id = "price" value = <?php echo $card['price'] ?>>
                </td>
            </tr>
            <tr>
            <td class="label">Type:</td>       
            <td>
                <select name="type" id="type" style = "width:250px">
                    <?php foreach($types as $item){?>
                    <option value="<?php echo $item['name'] ?>" <?php if($item['name'] == $card['type']){?> SELECTED <?php }?>><?php echo $item['name']?></option>
                    <?php } ?>
                </select>
            </td>
        </tr>
            <tr>
                <td class ="label">Previous image</td>
                <td><img src="<?php echo base_url(). $card['image'] ?>" style="display: block"/></td>
            </tr>
            <tr>
                <td class="label">New image</td>
                <td>
                    <input type="file" name="image" id="image" size="20" />
                </td>
             </tr>
             <tr>
            <td class="label">Status:</td>       
            <td>
                <select name="status" id="status" style = "width:250px">         
                    <option value="active">active</option>
                    <option value="deactive" <?php if($card['status'] == "deactive"){?> SELECTED <?php }?>>deactive</option>
                </select>
            </td>
        </tr>
            <tr>
            <td><input type="hidden" value="Update" name="update"></td>
            <td>
                <input type="submit" value="Lưu" />
				<input type="button" onclick="history.go(-1);" value="Hủy bỏ"/>
            </td>
            </tr>    

        </table>
    </form>
	</div>
</div>